#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#define TEM(x) int i=0, j=1,ret=x;for(i=0,j=1;i<31;i+=2,j+=2)  \
{ int tem1=1&(x>>i), tem2=1&(x>>j); if(tem1==tem2) continue; \
else {if(tem1==1)(ret=ret&(~(1<<i)));else if(tem1==0)(ret=ret|(1<<i));if(tem2==1)(ret=ret&(~(1<<j)));\
else if(tem2==0)(ret=ret|(1<<j));}         }
#undef CHECK 
#define CHECK(x,k) int l=(&x)-&(x.k);printf("%d",l)

int main()
{
	TEM(7);
	printf("%d\n", ret);





	/*struct A
	{
		char a;
		int b;
		char q;
		double w;


	}r;

	struct A* l = (&r);
	struct A* h = &(r.w);
	int t = h - l;
	*/
	/*printf("%d", l);
	printf("%p\n", &r);
	printf("%p\n", &(r.w));*/
	/*CHECK(r, w);*/

	return 0;
}